const {createClient} = require('redis');

const iotTestClient = createClient({
    url: 'redis://114.217.55.239:6379',
    password: 'ICONMAN20220106R',
    database: 14
}).on('connect', () => {
    console.log('iot_test Connected to Redis');
}).on('ready', () => {
    console.log('iot_test ready to Redis');
    iotTestClient.then(client => {
        client.ping().then(n=>{
            console.log(n);
        })
    })
}).on('reconnecting', () => {
    console.log('iot_test reconnecting to Redis');
}).on('error', (err) => {
    console.error('iot_test Failed to connect to Redis', err);
}).on('end', () => {
    console.error('end');
}).connect();
